package com.online.teaching.module.student.takes.controller;

import com.online.teaching.module.student.takes.domain.vo.GetTakesListVO;
import com.online.teaching.module.student.takes.service.StudentTakesService;
import com.online.teaching.utils.StatusCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import com.online.teaching.utils.Result;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName : StudentBlogController  //类名
 * @Description :   //描述
 * @Author : YG  //作者
 * @Date: 2020-11-04 13:20  //时间
 */
@Api(tags ="学生选课模块")
@RestController
public class StudentTakesController {

    @Autowired
    private StudentTakesService studentTakesService;

    @ApiOperation(value = "学生查询选课列表", notes = "学生查询选课列表")
    @GetMapping("student/takes/getTakesList")
    public Result<List<GetTakesListVO>> getTakesList(@ApiParam("学生id") @RequestParam("id") Integer id)
    {
        List<GetTakesListVO> takesList = studentTakesService.getTakesList(id);
        return new Result(true, StatusCode.OK,"查询成功",takesList);
    }
}
